/* 
 * Copyright (c) 2012, Fromentin Xavier, Schnell Michaël, Dervin Cyrielle, Brabant Quentin
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *      * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *      * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *      * The names of its contributors may not be used to endorse or promote products
 *       derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL Fromentin Xavier, Schnell Michaël, Dervin Cyrielle OR Brabant Quentin 
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
package kameleon.util;

import java.io.File;

/**
 * Utility interface for file and folder names and paths.
 * 
 * @author		Schnell Michaël
 * @version		1.0
 */
public interface FileConstants {
	
	/**
	 * The file extension used by Kameleon plug-ins.
	 */
	public static final String PLUGIN_EXTENSION = "kpl" ; //$NON-NLS-1$
	
	/**
	 * Name of the file which contains the informations about the plug-in 
	 * within the plug-in archive.
	 */
	public static final String PLUGIN_INFO_FILE_NAME = "plugin.info" ; //$NON-NLS-1$
	
	
	/**
	 * Utility constant, used to append a folder of file name to a given path.
	 * Contains {@code "%s\%s"} for Windows.
	 */
	public static final String PATH_EXTENSION = String.format("%%s%s%%s", File.separator) ; //$NON-NLS-1$

	
	/**
	 * Absolute path of the "Program Files" of the current Windows host machine.
	 */
	public static final String PROGRAM_FILES_FOLDER = System.getenv("ProgramFiles") ; //$NON-NLS-1$
	
	/**
	 * Absolute path of the current user's home.
	 */
	public static final String USER_HOME_FOLDER = System.getProperty("user.home") ; //$NON-NLS-1$

	
	/**
	 * Name of the work folder containing all the configuration files, the plug-ins 
	 * and their resources.
	 */
	public static final String PLUG_IN_WORK_FOLDER_NAME = ".kameleon" ; //$NON-NLS-1$
	
	/**
	 * Absolute path of the work folder containing all the configuration files, the plug-ins 
	 * and their resources.
	 */
	public static final String PLUG_IN_WORK_FOLDER = 
			String.format(PATH_EXTENSION, USER_HOME_FOLDER, PLUG_IN_WORK_FOLDER_NAME) ; 

	
	/**
	 * Name of the folder containing the java archives of the analyzer plug-ins.
	 */
	public static final String ANALYSER_FOLDER_NAME = "analyzer" ; //$NON-NLS-1$
	
	/**
	 * Absolute path of the folder containing the java archives of the analyzer plug-ins.
	 */
	public static final String ANALYSER_FOLDER = 
			String.format(PATH_EXTENSION, PLUG_IN_WORK_FOLDER, ANALYSER_FOLDER_NAME) ; 

	
	/**
	 * Name of the folder containing the java archives of the generator plug-ins.
	 */
	public static final String GENERATOR_FOLDER_NAME = "generator" ; //$NON-NLS-1$
	
	/**
	 * Absolute path of the folder containing the java archives of the generator plug-ins.
	 */
	public static final String GENERATOR_FOLDER = 
			String.format(PATH_EXTENSION, PLUG_IN_WORK_FOLDER, GENERATOR_FOLDER_NAME) ; 

	
	/**
	 * Name of the folder containing the language files.
	 */
	public static final String LANGUAGE_FOLDER_NAME = "language" ; //$NON-NLS-1$
	
	/**
	 * Absolute path of the folder containing the language files.
	 */
	public static final String LANGUAGE_FOLDER = 
			String.format(PATH_EXTENSION, PLUG_IN_WORK_FOLDER, LANGUAGE_FOLDER_NAME) ;
	
	/**
	 * Base name of all the language files.
	 */
	public static final String LANGUAGE_FILE_NAME = "Lang" ; //$NON-NLS-1$ 

	
	/**
	 * Name of the folder containing the configuration files.
	 */
	public static final String CONFIG_FOLDER_NAME = "config" ; //$NON-NLS-1$
	
	/**
	 * Absolute path of the folder containing the configuration files.
	 */
	public static final String CONFIG_FOLDER = 
			String.format(PATH_EXTENSION, PLUG_IN_WORK_FOLDER, CONFIG_FOLDER_NAME) ; 

	
	/**
	 * Name of the folder containing the resources for all plug-ins (typically pictures).
	 */
	public static final String PLUG_IN_RESOURCES_FOLDER_NAME = "resources" ; //$NON-NLS-1$
	
	/**
	 * Absolute path of the folder containing the resources for all plug-ins (typically pictures).
	 */
	public static final String PLUG_IN_RESOURCES_FOLDER = 
			String.format(PATH_EXTENSION, PLUG_IN_WORK_FOLDER, PLUG_IN_RESOURCES_FOLDER_NAME) ; 

	
	/**
	 * Name of the file containing the information about the installed analyzers.
	 */
	public static final String CONFIG_ANALYSER_FILE_NAME = "analyzer" ; //$NON-NLS-1$
	
	/**
	 * Absolute path of the file containing the information about the installed analyzers.
	 */
	public static final String CONFIG_ANALYSER_FILE = 
			String.format(PATH_EXTENSION, CONFIG_FOLDER, CONFIG_ANALYSER_FILE_NAME) ; 

	
	/**
	 * Name of the file containing the information about the installed generators.
	 */
	public static final String CONFIG_GENERATOR_FILE_NAME = "generator" ; //$NON-NLS-1$
	
	/**
	 * Absolute path of the file containing the information about the installed generators.
	 */
	public static final String CONFIG_GENERATOR_FILE = 
			String.format(PATH_EXTENSION, CONFIG_FOLDER, CONFIG_GENERATOR_FILE_NAME) ;  

	
	/**
	 * Name of the file containing the history for the recently used files.
	 */
	public static final String CONFIG_HISTORY_FILE_NAME = "history" ; //$NON-NLS-1$
	
	/**
	 * Absolute path of the file containing the history for the recently used files.
	 */
	public static final String CONFIG_HISTORY_FILE = 
			String.format(PATH_EXTENSION, CONFIG_FOLDER, CONFIG_HISTORY_FILE_NAME) ; 
	
	
	/**
	 * Format for the picture file name for the "normal" icon.
	 */
	public static final String FORMAT_ICON_FILE_NAME = "%s_icon.png" ; //$NON-NLS-1$
	
	/**
	 * Format for the picture file name for the grayed icon.
	 */
	public static final String FORMAT_GRAY_ICON_FILE_NAME = "%s_gray_icon.png" ; //$NON-NLS-1$
	
	/**
	 * Format for the picture file name for the small icon.
	 */
	public static final String FORMAT_MINI_FILE_NAME = "%s_mini.png" ; //$NON-NLS-1$

	
//	<<>> Currently not used <<>>
//	/**
//	 * Name of the file containing the values of various options.
//	 */
//	public static final String CONFIG_OPTIONS_FILE_NAME = "options" ; //$NON-NLS-1$
//	
//	/**
//	 * Absolute path of the file containing the values of various options.
//	 */
//	public static final String CONFIG_OPTIONS_FILE = 
//			String.format(PATH_EXTENSION, CONFIG_FOLDER, CONFIG_OPTIONS_FILE_NAME) ;

}// interface FileConstants